#ifndef PROJECTMANAGER_P_H
#define PROJECTMANAGER_P_H

#include <QObject>
#include "ProjectManager.h"

class QSettings;
class Node;
namespace Plugins
{
    class ProjectRunner;
    class EditorsManager;
    class ProjectManagerPrivate : public QObject
    {
        Q_OBJECT
        Q_DECLARE_PUBLIC(Plugins::ProjectManager)
    public:
        ProjectManagerPrivate();
        virtual ~ProjectManagerPrivate();
    private:
        void init();
        void loadProject(const QString & path);
        void closeProject();
        void restoreSession();
        void projectProperties(bool asNew = false);
        void fileActivated(const QString & path);
        void modifyChanged(const QString & path, bool m);
        void reloadTree();
        void projectRun(IConsole *console);
        QStringList searchInProject(const QString & search, const QString & filePattern, bool isCase, bool isWhole, bool isRegular, const QString & path = "");
    private slots:
        void onItemActivated(const QModelIndex & index);
        void onItemCollapsed(const QModelIndex & index);
        void onItemExpanded(const QModelIndex & index);
        void onMenuShow(const QPoint & point);
        void stopProject();
    public slots:
        void call();
        void rename(Node * node);
        void moduleAdd(Node * node);
    private:
        Plugins::ProjectManager *q_ptr;
        Project *_project;
        IEditorsManager * _editors;
        ProjectRunner *_runner;
    };
}
#endif
